FROM node:latest

# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
ENV CHOKIDAR_USEPOLLING true
ENV TERM xterm

RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list 

RUN mkdir -p /app

WORKDIR /app

ENV TZ="Asia/Shanghai"

COPY package*.json ./

# 如果各公司有自己的私有源，可以替换registry地址
RUN npm install --registry=https://registry.npm.taobao.org

COPY . .

# 如果端口更换，这边可以更新一下
EXPOSE 7002

CMD ["npm", "run", "dev"]